#ifndef AC_COMMON_ISTREAM_HPP_
#define AC_COMMON_ISTREAM_HPP_

class String;

class IStream
{
public:
    IStream(char delimiter = '\n')
        : delem(delimiter)
    {
    }

    const char delim() const
    {
        return delem;
    }

    virtual bool append_line(String& , char c) = 0;
    bool append_line(String& str)
    {
        return append_line(str, delem);
    }
    bool getline(String& str, char c);
    bool getline(String& str);

    virtual bool read(void* , unsigned int) = 0;

    virtual ~IStream() {}

private:
    char delem;
};

#endif  // AC_COMMON_ISTREAM_HPP_
